Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
glsl-token-depth
Advanced tools
Determine the scope depth of an array of GLSL tokens.
Useful for inferring the scope of variables in a GLSL shader without having to fully parse the source.
depth(tokens)
Where tokens
is an array of tokens returned from
glsl-tokenizer
. Each token will
be modified in-place, and given a depth
property.
var tokenize = require('glsl-tokenizer/string')
var depth = require('glsl-token-depth')
var fs = require('fs')
var src = fs.readFileSync('shader.frag', 'utf8')
var tokens = tokenize(src)
depth(tokens)
tokens[0].depth // 0
tokens[1].depth // 0
tokens[2].depth // 0
tokens[3].depth // 0
tokens[4].depth // 1
// ...
MIT. See LICENSE.md for details.
FAQs
Determine the scope depth of an array of GLSL tokens
The npm package glsl-token-depth receives a total of 134,487 weekly downloads. As such, glsl-token-depth popularity was classified as popular.
We found that glsl-token-depth demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.